package com.mystring.service.impl;

import com.mystring.dao.ProductDao;
import com.mystring.po.Product;
import com.mystring.service.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * ClassName: ProdectServiceImpl
 * Package: com.mystring.service.impl
 * Description:
 *
 * @Author 刘英杰
 * @Create 2024/12/6 21:16
 * @Version 1.0
 */

@Service
public class ProductServiceImpl implements ProductService {
    /*交给Spring注入*/
    @Autowired
    private ProductDao productDao;

    @Override
    public void updateProduct(Product product) {
        productDao.updateProduct(product);
    }

    @Override
    public List<Product> findAll() {
        return productDao.findAll();
    }

    public void setProductDao(ProductDao productDao) {
        this.productDao = productDao;
    }
}
